package com.esteel.settlement.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.esteel.settlement.entity.TbSettFund;
import com.esteel.settlement.entity.TbSettFundPK;

/**
 * 账户数据处理表
 * @author yuhui
 *
 */
public interface SettFundRepository extends JpaRepository<TbSettFund, TbSettFundPK>,ISettFundRepository{

	/**
	 * 根据类型查询单个账户 用于查询清收、利息、手续费子账户
	 * 手续费子账户 3
	 * 利息子账户 4
	 * 清收子账户 5
	 * @param custType
	 * @return
	 */
	public TbSettFund findFirstByCustType(int custType);
	
	@Query("select t from TbSettFund t where t.id.custAcctId=?1")
	public TbSettFund findByCustAcctId(String custAcctId);
}
